import Vue from "vue"
//引入路由
import vueRouter from "vue-router"

//注册使用路由
Vue.use(vueRouter)


import index from "@/components/index"
import login from "@/components/login"
import regist from "@/components/regist"
import userCenter from "@/components/user/center"

export default new vueRouter({
    mode:"history",//去掉#号
    routes:[
         {
            path:"/index",
            component: index,
            meta:{
                title: '首页'
            }
        },
        {
            path:"/",
            component: index,
            meta:{
                title: '首页'
            }
        },
        {
            path:"/login",
            component: login,
            meta:{
                title: '登录'
            }
        },
        {
            path:"/regist",
            component: regist,
            meta:{
                title: '用户注册'
            }
        },
        {
            path:"/user/center",
            component: userCenter,
            meta:{
                title: '个人中心'
            }
        }
    ]
})

